All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class quicktime.std.image.QTImage

java.lang.Object
   |
   +----quicktime.std.image.QTImage

public class QTImage
extends Object
implements QuickTimeLib
The QTImage class provides static methods and constants for compressing and decompressing QuickTime images.

Instance of this class can be used to associate an ImageDescription with the encoded Image data that the description describes.


Constructor Index

 o QTImage(ImageDescription, EncodedImage)
Associate an image description with the image data that is described by the description.

Method Index

 o compress(QDGraphics, QDRect, int, int, EncodedImage)
Compresses a single frame image that is currently stored as a pixel map.
 o convert(ImageDescription, EncodedImage, int, ColorTable, int, int, int, CodecComponent, EncodedImage)
Converts the format of a compressed image.
 o decompress(EncodedImage, ImageDescription, QDGraphics, QDRect, int)
Decompresses a single frame image into a pixel map structure.
 o decompress(EncodedImage, ImageDescription, QDGraphics, QDRect, QDRect, int, Region)
Decompresses a single frame image into a pixel map structure.
 o fCompress(QDGraphics, QDRect, int, int, int, CodecComponent, ColorTable, int, EncodedImage)
Compresses a single frame image that is currently stored as a pixel map.
 o fDecompress(EncodedImage, ImageDescription, QDGraphics, QDRect, Matrix, int, Region, PixMap, QDRect, int, CodecComponent)
Decompresses a single frame image into a pixel map structure.
 o getCompressedSize(ImageDescription, EncodedImage)
Determines the size in bytes of a compressed image.
 o getCompressionTime(QDGraphics, QDRect, int, int, CodecComponent, int, int)
Determines the estimated amount of time required to compress a given image.
 o getDescription()
Return the description that describes the associated data.
 o getImage()
Return the image data
 o getMaxCompressionSize(QDGraphics, QDRect, int, int, int, CodecComponent)
Determines the maximum size an image will be after compression.
 o getSimilarity(QDGraphics, QDRect, ImageDescription, EncodedImage)
Compares a compressed image to a picture stored in a pixel map and returns a value indicating the relative similarity of the two images.
 o trim(ImageDescription, EncodedImage, EncodedImage, QDRect)
Ajusts a compressed image to the boundaries defined by a QDRect specified by your application.

Constructors

 o QTImage
 public QTImage(ImageDescription id,
                EncodedImage im)
Associate an image description with the image data that is described by the description.

Parameters:
id - the image description
im - the image data

Methods

 o getImage
 public EncodedImage getImage()
Return the image data

 o getDescription
 public ImageDescription getDescription()
Return the description that describes the associated data.

 o compress
 public static final ImageDescription compress(QDGraphics src,
                                               QDRect srcRect,
                                               int quality,
                                               int cType,
                                               EncodedImage data) throws QTException
Compresses a single frame image that is currently stored as a pixel map. The size of the compressed image can be obtained from the ImageDescription object which is returned.

QuickTime::CompressImage

Parameters:
src - the QDGraphics that contains the PixMap for compressing. This may NOT be null.
srcRect - a Rect defining the portion of the image to compress
quality - the desired compressed image quality
cType - a compressor type
data - a encoded image object to receive the compressed image data. It is your program's responsibility to make sure that this object can receive at least as much data as indicated by the getMaxCompressionSize method.
Returns:
an ImageDescription object. Your application should store this image description with the compressed image data.
 o fCompress
 public static final ImageDescription fCompress(QDGraphics src,
                                                QDRect srcRect,
                                                int colorDepth,
                                                int quality,
                                                int cType,
                                                CodecComponent c,
                                                ColorTable clut,
                                                int flags,
                                                EncodedImage data) throws QTException
Compresses a single frame image that is currently stored as a pixel map. The size of the compressed image can be obtained from the ImageDescription object which is returned.

QuickTime::FCompressImage

Parameters:
src - a QDGraphics that contains the PixMap for compressing. This may NOT be null.
srcRect - a QDRect defining the portion of the image to compress
colorDepth - the depth at which the image is likely to be viewed
quality - the desired compressed image quality
cType - a compressor type
c - a compressor or codec identifier
clut - a custom color lookup table
flags - flags providing further control information
data - a EncodedImage object to receive the compressed image data. It is your program's responsibility to make sure that this object can receive at least as much data as indicated by the getMaxCompressionSize method.
Returns:
an ImageDescription object. Your application should store this image description with the compressed image data.
 o convert
 public static final ImageDescription convert(ImageDescription srcDD,
                                              EncodedImage srcData,
                                              int colorDepth,
                                              ColorTable clut,
                                              int accuracy,
                                              int quality,
                                              int cType,
                                              CodecComponent codec,
                                              EncodedImage dstData) throws QTException
Converts the format of a compressed image.

QuickTime::ConvertImage

Parameters:
srcDD - the image description structure that describes the compressed image
srcData - the encoded image data to convert
colorDepth - the depth at which the recompressed image is likely to be viewed
clut - a custom color look up table
accuracy - the accuracy for the decompressed image
quality - the desired compressed image quality
cType - the compressor type
codec - a CodecComponent
destData - a EncodedImage object to receive the converted image data. It is your program's responsibility to make sure that this object can receive at least as much data as indicated by the getMaxCompressionSize method.
Returns:
an ImageDescription object defining the converted image data. Your application should store this image description with the converted image data.
 o trim
 public static final void trim(ImageDescription desc,
                               EncodedImage inData,
                               EncodedImage outData,
                               QDRect trimRect) throws StdQTException
Ajusts a compressed image to the boundaries defined by a QDRect specified by your application.

QuickTime::TrimImage

Parameters:
desc - an ImageDescription object that describes the compressed image. On return from this method, the compressor updates this image description to refer to the resized image.
inData - the encoded image data
outData - a encoded image object to receive the trimmed image. Your application should create this object at least as large as the source image.
trimRect - defines the desired dimensions of the trimmed image
 o decompress
 public static final void decompress(EncodedImage data,
                                     ImageDescription desc,
                                     QDGraphics dst,
                                     QDRect dstRect,
                                     int mode) throws StdQTException, QDException
Decompresses a single frame image into a pixel map structure.

QuickTime::DecompressImage

Parameters:
data - a EncodedImage object that contains the compressed image data
desc - an ImageDescription object that defines the compressed image
dst - a QDGraphics that contains the PixMap where the decompressed image is to be displayed. This may NOT be null.
dstRect - a QDRect into which the decompressed image is to be loaded
mode - the transfer mode for the operation
 o decompress
 public static final void decompress(EncodedImage data,
                                     ImageDescription desc,
                                     QDGraphics dst,
                                     QDRect srcRect,
                                     QDRect dstRect,
                                     int mode,
                                     Region mask) throws StdQTException, QDException
Decompresses a single frame image into a pixel map structure.

QuickTime::DecompressImage

Parameters:
data - a EncodedImage object that contains the compressed image data
desc - an ImageDescription object that defines the compressed image
dst - a QDGraphics that contains the PixMap where the decompressed image is to be displayed. This may NOT be null.
srcRect - a QDRect defining the portion of the image to decompress
dstRect - a QDRect into which the decompressed image is to be loaded
mode - the transfer mode for the operation
mask - a clipping region in the destination coordinate system
 o fDecompress
 public static final void fDecompress(EncodedImage data,
                                      ImageDescription desc,
                                      QDGraphics dst,
                                      QDRect srcRect,
                                      Matrix matrix,
                                      int mode,
                                      Region mask,
                                      PixMap matte,
                                      QDRect matteRect,
                                      int accuracy,
                                      CodecComponent codec) throws StdQTException, QDException
Decompresses a single frame image into a pixel map structure.

QuickTime::FDecompressImage

Parameters:
data - a EncodedImage object that contains the compressed image data
desc - an ImageDescription object that defines the compressed image
dst - a QDGraphics that contains the PixMap where the decompressed image is to be displayed. This may NOT be null.
srcRect - a QDRect defining the portion of the image to decompress
matrix - a Matrix specifies how to transform the image during decompression
mode - the transfer mode for the operation
mask - a Region in the destination coordinate system
matte - a PixMap that contains a blend matte
matteRect - a QDRect defining a portion of the blend matte to apply
accuracy - the accuracy desired in the decompressed image
codec - a codec component
 o getMaxCompressionSize
 public static final int getMaxCompressionSize(QDGraphics src,
                                               QDRect srcRect,
                                               int colorDepth,
                                               int quality,
                                               int cType,
                                               CodecComponent c) throws StdQTException, QDException
Determines the maximum size an image will be after compression. The size returned is in the number of bytes that the encoded image will require.

see QuickTime::GetMaxCompressionSize

Parameters:
src - is a QDGraphics that contains the PixMap to be compressed. This may NOT be null.
srcRect - points to the QDRect defining the portion of the source image that is to be compressed
colorDepth - the depth at which the image is to be compressed
quality - the desired compressed image quality
cType - a compressor type
c - a compressor component
Returns:
size of the compressed pixmap
 o getCompressedSize
 public static final int getCompressedSize(ImageDescription desc,
                                           EncodedImage data) throws StdQTException
Determines the size in bytes of a compressed image.

QuickTime::GetCompressedImageSize

Parameters:
desc - an ImageDescription object that defines the compressed image
data - a EncodedImage object that contains the compressed image data
Returns:
the size of the compressed image in bytes
 o getCompressionTime
 public static final int getCompressionTime(QDGraphics src,
                                            QDRect srcRect,
                                            int colorDepth,
                                            int cType,
                                            CodecComponent c,
                                            int spatialQuality,
                                            int temporalQuality) throws StdQTException, QDException
Determines the estimated amount of time required to compress a given image.

see QuickTime::GetCompressionTime

Parameters:
src - a QDGraphics that contains a PixMap object that will be compressed. This may be null.
srcRect - a QDRect defining the portion of the source image that is to be compressed
colorDepth - the depth at which the image is to be compressed
cType - a compressor type
c - the compressor component
spatialQuality - the desired compressed image spatial quality
temporalQuality - the desired compressed image temporal quality
Returns:
the compression time in milliseconds
 o getSimilarity
 public static final float getSimilarity(QDGraphics src,
                                         QDRect srcRect,
                                         ImageDescription desc,
                                         EncodedImage data) throws StdQTException, QDException
Compares a compressed image to a picture stored in a pixel map and returns a value indicating the relative similarity of the two images.

QuickTime::GetSimilarity

Parameters:
src - a QDGraphics that contains a PixMap object containing a noncompressed image.
srcRect - a QDRect defining the portion of the source image to compare to the compressed image
desc - an ImageDescription object that defines the compressed image
data - an EncodedImage object that contains the compressed image data
Returns:
the relative similarity value

All Packages  Class Hierarchy  This Package  Previous  Next  Index